﻿namespace ProjectIndieFarm
{
    public class ChallengeGroupTomato
    {
        public static void Setup(IChallengeSystem system)
        {
            var carrot1 = system.Add(new GenericChallenge()
                .SetChallengeName("收获第 1个西红柿")
                .OnCheckFinish(self => ChallengeSystem.HarvestedCountTomato > 0)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 150;
                    self.SendMessageWithReward(150);
                }));
            var carrot10 = system.Add(new GenericChallenge()
                .SetChallengeName("收获第10个西红柿")
                .OnCheckFinish(self => ChallengeSystem.HarvestedCountTomato >= 10)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 150;
                    self.SendMessageWithReward(150);
                }));
            var carrot20 = system.Add(new GenericChallenge()
                .SetChallengeName("收获第20个西红柿")
                .OnCheckFinish(self => ChallengeSystem.HarvestedCountTomato >= 20)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 150;
                    self.SendMessageWithReward(150);
                }));
            var carrot45 = system.Add(new GenericChallenge()
                .SetChallengeName("收获第45个西红柿")
                .OnCheckFinish(self => ChallengeSystem.HarvestedCountTomato >= 45)
                .OnFinish(self =>
                {
                    Global.Coins.Value += 150;
                    Global.ShowBeansSeedInShop.Value = true;
                    self.SendMessageWithRewardAndOther(150, "商店新增<color=orange>豆角种子</color>");
                }));
        }
    }
}
